<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------


/*======================= start 小程序公众平台 ========================*/
Route::group('platform',function(){

	//申请小程序页面
	Route::get('applyMiniProgram', 'platform/index/applyMiniProgram');
	//创建小程序
	Route::post('createMiniProgram', 'platform/index/createMiniProgram');
	//小程序开发文档
	Route::get('document', 'platform/index/document');


});
/*======================= start 小程序公众平台 ========================*/


/*======================= start 小程序微信api ========================*/
Route::group('applogin',function(){

	//获取token
	Route::get('getToken', 'index/applets.login/getToken');
	//检查token
	Route::post('verifyToken', 'index/applets.login/verifyToken');



});
Route::group('app',function(){


	//小程序列表
	Route::post('miniapplist', 'index/applets.index/miniapplist');


});

//不对外只在app中调用
Route::group('mpsys',function(){

	//获取小程序信息
	Route::get('getminiprograminfo', 'index/applets.MiniProgram/getminiprograminfo');
	//下载小程序源码
	Route::post('downsource', 'index/applets.MiniProgram/downsource');
	//上传提交小程序源码
	Route::post('commitsource', 'index/applets.MiniProgram/commitsource');


});


//服务端对外的接口
Route::group('mpapi',function(){

	//小程序登录获取openid
	Route::get('jscode2session', 'index/applets.MiniProgram/jscode2session');


});
/*======================= end 小程序微信api ========================*/


